//
//  BrowseRecordViewController.m
//  味·道
//
//  Created by lanou3g on 15/7/1.
//  Copyright (c) 2015年 WMR. All rights reserved.
//

#import "BrowseRecordViewController.h"

@interface BrowseRecordViewController ()
@property (nonatomic,retain)UIButton *backButton;
@property (nonatomic,retain)UIButton *deleteButton;
@end

@implementation BrowseRecordViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor orangeColor];
    // Do any additional setup after loading the view.
    [self createBackButton];
    [self createTitleLabel];
    [self createDeleteButton];
}
#pragma mark - 创建返回键,标题Label
-(void)createBackButton{
    UIButton *backButton = [UIButton buttonWithType:(UIButtonTypeSystem)];
    backButton.frame = CGRectMake(15, 30, 50, 18);
    [backButton setTitle:@"返回" forState:(UIControlStateNormal)];
    [backButton addTarget:self action:@selector(backToList:) forControlEvents:(UIControlEventTouchUpInside)];
    self.backButton = backButton;
    [self.view addSubview:self.backButton];
}
//返回上一页面
-(void)backToList:(UIButton *)sender{
    [self.navigationController popViewControllerAnimated:YES];
}
-(void)createTitleLabel{
    UILabel *titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(150, 30, 80, 20)];
    titleLabel.textColor = [UIColor whiteColor];
    titleLabel.text = @"浏览记录";
    titleLabel.font = [UIFont boldSystemFontOfSize:18.0f];
    [self.view addSubview:titleLabel];
    [titleLabel release];
}
//创建删除按钮
-(void)createDeleteButton{
    self.deleteButton = [UIButton buttonWithType:UIButtonTypeSystem];
    self.deleteButton.frame = CGRectMake(320, 30, 50, 18);
    [self.deleteButton setTitle:@"删除" forState:(UIControlStateNormal)];
    [self.deleteButton addTarget:self action:@selector(deleteFavorite:) forControlEvents:(UIControlEventTouchUpInside)];
    [self.view addSubview:self.deleteButton];
}
-(void)deleteFavorite:(UIButton *)sender{
    
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
